package com.design.patterns.list.factory.methodfactory;

import com.design.patterns.list.factory.Pizza;

/**
 * @author Wangzhiwen
 */
public class LDOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String pizzaName) {
        Pizza pizza;
        if ("LDAPizza".equals(pizzaName)){
            pizza = new LDAPizza();
        }else if ("LDBPizza".equals(pizzaName)){
            pizza = new LDBPizza();
        }else {
            pizza = new LDCPizza();
        }
        return pizza;
    }
}
